package com.gitee.baqkft.code.exe;

import java.awt.EventQueue;
import java.util.Objects;

import javax.swing.JFrame;
import javax.swing.UIManager;

import com.gitee.baqkft.code.ui.dlg.MainUI;

/**
 * 主程序入口
 * @author chenmingcai
 * @date 2018年5月19日 上午10:22:03 
 *
 */

public class Executable
{

	public static void main(String[] args)
	{
		if(UIManager.getLookAndFeel().isSupportedLookAndFeel())
		{
			String platform = UIManager.getSystemLookAndFeelClassName();
			String lookLike = UIManager.getLookAndFeel().getName();
			if(!Objects.equals(platform, lookLike))
			{
				try
				{
					UIManager.setLookAndFeel(platform);
				}
				catch(Exception ex)
				{
					ex.printStackTrace();
				}
			}
		}
		
		EventQueue.invokeLater(() -> {
			MainUI ui = new MainUI();
			ui.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
			ui.setLocationRelativeTo(null);
			ui.setTitle("软件开发助手");
			ui.setVisible(true);
		});
	}
}
